package com.zk.stock.config;

import com.zk.stock.utils.IdWorker;
import com.zk.stock.utils.ParserStockInfoUtil;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author 曹自康的Laptop
 * @version 1.0
 * @Date 2024-07-039:44
 */
@Configuration
public class HttpClientConfig {
    /**
     * 定义http客户端Bean
     *
     * @return
     */
    @Bean
    public RestTemplate restTemplate(){
        return  new RestTemplate();
    }
    @Bean
    public ParserStockInfoUtil parserStockInfoUtil(IdWorker idWorker){
        return new ParserStockInfoUtil(idWorker);
    }
}
